<%@page import="com.mmy.domain.permissionmenu.TConstMenu"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="/WEB-INF/jsp/includeb.jsp"></jsp:include>
<title>菜单管理</title>
</head>
<body>
	<div id="off-canvas-container" class="off-canvas-container">
		<jsp:include page="/WEB-INF/jsp/BackHeader.jsp"></jsp:include>
		<main class="at-padding-large-bottom"> <article> <header
			class="bg-light at-padding-large-top at-padding-large-bottom at-margin-large-bottom">
		<div class="page-header container">
			<h2>系统设置</h2>
		</div>
		</header> <section class="container">
		<div>
			<form action="backmenu" class="info-form">
				<h4 class="info-h4">
					<i class="fa fa-caret-right" aria-hidden="true"></i>菜单信息管理
				</h4>

				<hr
					style="FILTER: alpha(opacity = 100, finishopacity = 0, style = 3); margin: 15px;"
					width=100%; color=#F9F6E5 SIZE=3>
				</h>
				<a href="frontmenu">前台菜单</a>| <a href="backmenu">后台菜单</a>
				<div>

					<input type="button" class="btn at-float-right" value="下移" onclick="downBackMenu()"> 
					<input type="button" class="btn at-float-right" value="上移" onclick="upBackMenu()">
					<input type="button" value="删除" class="btn at-float-right" onclick="delMenu()"> 
					<input type="button" value="修改" class="btn at-float-right" onclick="updateMenu()">
					<input type="button" class="btn at-float-right" value="新增" onclick="location.href='createmenu'"> 
					菜单名称 ：<input type="text" class="input-width" name="strMenuName" value="${strMenuName}"> 
					菜单类型 ： <select class="input-select-vlign" name="strType" style="bottom: 10px">
						<option style="display: none;" value="${strType}">
							<c:choose>
								<c:when test="${strType == 0}">
								           		子菜单
								     </c:when>
								<c:when test="${strType == 1}">
								         		  顶级菜单
								     </c:when>
								<c:when test="${strType == 2}">
								          		 操作链接
								     </c:when>
								<c:otherwise>
								               	请选择
								    </c:otherwise>
							</c:choose>
						</option>
						<option value="">请选择</option>
						<option value="0">子菜单</option>
						<option value="1">顶级菜单</option>
						<option value="2">操作链接</option>
						
					</select>



					<c:choose>
						<c:when test="${strChildMenu == 1}">
							<input type="checkbox" name="strChildMenu" value="1" checked>：是否包含子菜单
                      
                   </c:when>
						<c:otherwise>
							<input type="checkbox" name="strChildMenu" value="1">：是否包含子菜单
                   </c:otherwise>

					</c:choose>
					<input type="submit" value="搜索" class="btn" />
					<table class="info-table">
						<tr>
							<th><input type="checkbox" id="ckall" name="ckall"
								onclick="ckAll(this);"></th>
							<th>菜单名称</th>
							<th>菜单url</th>
							<th>排序</th>
							<th>菜单类型</th>
							<th>前后台</th>
							<th>备注</th>
						</tr>
						<c:forEach var="lstConstMenu" items="${lstConstMenu}">
							<tr>
								<td>
									<input type="checkbox" name="ckone" value="${lstConstMenu.getMenuID()}" onclick="ckOne(this)">
								</td>
								<td>${lstConstMenu.getMenuName()}</td>
								<td>${lstConstMenu.getUrl()}</td>
								<td>${lstConstMenu.getSort()}</td>
								<c:choose>
									<c:when test="${lstConstMenu.getType() == 0}">
										<td>子菜单</td>
									</c:when>
									<c:when test="${lstConstMenu.getType() == 1}">
										<td>顶级菜单</td>
									</c:when>
									<c:otherwise>
										<td>操作链接</td>
									</c:otherwise>
								</c:choose>
								<c:choose>
									<c:when test="${lstConstMenu.getState() == 1}">
										<td>前台</td>
									</c:when>
									<c:when test="${lstConstMenu.getState() == 2}">
										<td>后台</td>
									</c:when>
									<c:otherwise>
										<td>默认</td>
									</c:otherwise>
								</c:choose>
								<td>${lstConstMenu.getMemo()}</td>
							</tr>
						</c:forEach>


					</table>
					<select class="input-select-vlign" name="pageSize" onchange="backPageSize(this.options[this.options.selectedIndex].value)">
						<option style="display: none;">${iPageSize}</option>
						<option value="20">20</option>
						<option value="50">50</option>
						<option value="100">100</option>
						<option value="200">200</option>
					</select> 
						<a href="backmenu?pageNumber=1&strMenuName=${requestScope.strMenuName}&strType=${strType}&pageSize=${iPageSize}&strChildMenu=${strChildMenu}">首页</a>

					<c:choose>
						<c:when test="${iPageNo == 1}">

						</c:when>
						<c:otherwise>
							<a href="backmenu?pageNumber=${iPageNo-1}&strMenuName=${requestScope.strMenuName}&strType=${strType}&pageSize=${iPageSize}&strChildMenu=${strChildMenu}">上一页</a>
						</c:otherwise>

					</c:choose>
					<c:choose>
						<c:when test="${iPageNo == iMaxPage}">

						</c:when>
						<c:otherwise>
							<a href="backmenu?pageNumber=${iPageNo+1}&strMenuName=${requestScope.strMenuName}&strType=${strType}&pageSize=${iPageSize}&strChildMenu=${strChildMenu}">下一页</a>
						</c:otherwise>

					</c:choose>
						<a href="backmenu?pageNumber=${iMaxPage}&strMenuName=${requestScope.strMenuName}&strType=${strType}&pageSize=${iPageSize}&strChildMenu=${strChildMenu}">尾页</a>

				</div>
			</form>
		</div>
		</section> </article> </main>
		<jsp:include page="/WEB-INF/jsp/Footer.jsp"></jsp:include>
	</div>
	<jsp:include page="/WEB-INF/jsp/include2.jsp"></jsp:include>
</body>
</html>